home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
wais
/
waisgate
/
README
< prev
next >
Wrap
Text File
|
1995-05-09
|
10KB
|
243 lines
This directory contains the HyperText server (httpd ) required
set up an XMosaic hyper-node to serve hyper text documents to
users of XMosaic.
There are several ways to get httpd installed on your machine
The easy way :
get the custom installable floppy, type custom.
This disk image is called "01"
The hard way :
get the compressed tar file of binaries and config files,
add your own /etc/services , /etc/inetd.conf entries.
/etc/services:http 80/tcp
/etc/inetd.conf:http stream tcp nowait nouser /usr/local/etc/httpd httpd
This tar file is called
httpd.tar.Z
The hard core way:
get the srcs, type imake; make; ( compile your own ).
This way is called
httpd-src.tar.Z
These files are in the current directory.
Details of rules file configuration follow.
Have fun,
hess@sco.com
============ /usr/local/etc/httpd.conf file format ==========
The Rule File
The rule file defines how the WWW software will translate a request
into an document name. For a server, it allows one to provide an
extra level of name mapping above that given by links in the file
system. It allows, for example, out of date names to mapped onto
their more recent counterparts.
For the client, it allows access to certain servers to be remapped
for example caching servers, or to local copies of the same
information.
The rule file also allows access to be restricted. This is
essential, to prevent, for example, unauthorized access to your
password file.
By default, the rule file /usr/local/etc/httpd.conf is loaded, unless
specified otherwise with the -R or -r options .
See example rule files , Old format for software before 2.0
FORMAT
Each line consists of an operation code and one or two parameters,
referred to as the template and the result. Anything on a line
after and including a hash sign (#) is ignored, as are empty lines.
The server uses the top rule first, then EACH SUCCESSIVE RULE
unless told otherwise. The operation codes are as follows
map template result If the address matches the template, use the
result string from now on for future rules.
pass template If the address maches the template, use it
as it is, porocessing no further rules.
fail template If the address matches the template,
prohibit access, processing no futher rules.
The template string may contain at most one wildcard asterisk
("*"). The result string may have one wildcard only if the template
has one.
When matching,
Rules are scanned from the top of the file to the bottom.
If a request matches a "map" template exactly, the result string
is used instead of the original string and applied to successive
rules.
If the request maches a "map" template with wildcard, then the
text of the request which matches the wildcard is inserted in
place of the wildcard in the result string to form the
translated request. If the result string has no wildcard, it is
used as it is.
When a substitution takes place, the rule scan continues with
the next rule using the new string in place of the request.
Tim BL
RULE FILE EXAMPLES
A basic rule file for the http daemon might look like this (it looked
different before version 2.0):
map / /welcome.html
map /* file:/u/john/public/*
pass file:/u/john/public/*
fail *
The first line maps the root document onto a specific document about t
he server.
The second line maps all document names onto filenames in a particular
directory.
The third line allows access to all documenst in that directory.
The fouth line disallows access to all other documents. (There won't b
e in any in this case because of the mapping, but its wise to put in f
or later).
Second example
map / /tnotes/welcome.html
map /tnotes/* file:/u/john/public/*
map /seminars/* file:/u/jane/seminars/*
pass file:/u/john/public/*
pass file:/u/jane/seminars/*.html
fail *
The first line maps the root document onto a specific document about t
he server. (See etiquette )
The second line maps all document names starting with /tnote/ onto fil
enames in a particular directory where john maintains the technical no
tes. If someone else takes over the technical notes, we can change thi
s. Here we are starting to distinguish between document names and file
names. This can be carried much further if necessary, but one level o
f mapping is enough to allow for changes of administration of differen
t areas.
The third line separately maps the seminar information into Jane's dir
ectory.
The third and fourth line enable access to anything in John's "public"
directory, and any .html file in Jane's "seminar" directory tree. Not
e here that the * maps to any sequence INCLUDING SLASHES so all files
in any subdirectory of /u/jane/seminars will be enabled so long as the
y end in .html.
The bottom line will pick up for example any attempt to use the server
to access non-html files in Jane's seminars directory.
Configuration file for a WAIS gateway
The httpd daemon can be used as a WAIS gateay if it has been compiled
with the necessary options and linked with the freeWAIS software. A su
itable configuration file is
map /* wais://*
pass wais://*
fail *
=============================
Server Command LineThe command line syntax for the
basic www server allows a number of options
and an optional directory argument.
httpd [options] [directory]
The directory argument, if present,
indicates the directory to be exported.
(Version 2.0 and later only.) If
not present, either a rule file is
be used, to export combinations of
directories, or else the default
is to export the "/Public" directory
tree.
EXAMPLES
httpd -p 80 -dyt /ftp/pub
This exports the entire /ftp/pub
tree with browsable directories and
README files included at the top
of directory listings.
httpd
This comamnd in the inetd configuration
file inetd.conf exports the /Public
directory tree. This tree may contain
soft links to other directory trees.
-dn Disable directory browsing. An attempt to
access a directory will generate an error
response.
-dy Enable direcory browsing. Directories are
returned as hypertext documents. See browsing
directories .
-ds Enable directory browsing only for
directories containing a file named
".www_browsable". This is the default.
-dt For any browsable directory which contains a
README file, include the text of the README
file at the top of the document before the
listing. This is the default.
-db As -dt but put the README at the bottom,
after the listing. The -db and -dt options
may be combined with -dy as -dyb, -dty etc.
-dr Disables the README inclusion feature .
-l file Log all calls to the given file. The file is
appended to if it already exists.
-p port Specify the port number. If this option is
not given, the daemon assumes that it has
been run by inetd, and uses stdin and stdout
as its communication channel . Note that port
numbers under 1024 are privileged .
-v Verbose mode. Copious trace messages are
written to the standard output stream. Mainly
for debugging.
-r file Load a rule file . The rules are added after
any rules already loaded. Inhibits the
loading of the default rule file.
-R Inhibit the loading of the default rule
file. Warning: running without a rule file
normally poses a security problem.
Tim BL